<%@ page language="java" import="java.util.*" pageEncoding="UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="spf" uri="http://www.springframework.org/tags/form" %>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"+ request.getServerName() + ":" + request.getServerPort()+ path + "/";
%>
		     <table width="100%" class="table">
					<tr align="center">
						<td class="td">序列</td>
						<td class="td">公司代码</td>
						<td class="td">文件名称</td>
						<td class="td">操作对象</td>
						<td class="td">运行状态</td>
						<td class="td">运行时间</td>
						<td class="td">结束时间</td>
						<td class="td">读取行/总行数</td>	
                        <td class="td">操作</td>
					</tr>
					<c:if test="${not empty fenye.dataList}">
						<c:forEach items="${fenye.dataList}" var="run" varStatus="tst">
								<c:if test="${run.lockFlag=='E'}">
									<tr align="center" bgcolor="#99CCFF">
										<td class="td">${run.recordNo}</td>
										<td class="td">${run.companyId}</td>
										<td class="td">${run.fileName}</td>
										<td class="td">${run.description}</td>
										<td class="td">文件已上传</td>
										<td class="td"><fmt:formatDate value="${run.runTime}" pattern="yyyy-MM-dd HH:mm:ss" /></td>
										<td class="td"><fmt:formatDate value="${run.endTime}" pattern="yyyy-MM-dd HH:mm:ss" /></td>
									    <td class="td"><fmt:formatNumber value="${run.rowLines}" pattern="#" type="number"/> / <fmt:formatNumber value="${run.numLines}" pattern="#" type="number"/></td>
										
										<td class="td">&nbsp;</td>	
									</tr>
								</c:if>
								
								<c:if test="${run.lockFlag=='R'}">
									<tr align="center" bgcolor="#FFCCFF">
										<td class="td">${run.recordNo }</td>
										<td class="td">${run.companyId}</td>
										<td class="td">${run.fileName}</td>
										<td class="td">${run.description}</td>
										<td class="td">正在运行</td>
										<td class="td"><fmt:formatDate value="${run.runTime}" pattern="yyyy-MM-dd HH:mm:ss" /></td>
										<td class="td"><fmt:formatDate value="${run.endTime}" pattern="yyyy-MM-dd HH:mm:ss" /></td>
										<td class="td"><fmt:formatNumber value="${run.rowLines}" pattern="#" type="number"/> / <fmt:formatNumber value="${run.numLines}" pattern="#" type="number"/></td>
										<td class="td">&nbsp;</td>	
									</tr>
								</c:if>
								 
								<c:if test="${run.lockFlag=='N'}">
									<tr align="center" bgcolor="#CCCCCC">
										<td class="td">${run.recordNo }</td>
										<td class="td">${run.companyId}</td>
										<td class="td">${run.fileName}</td>
										<td class="td">${run.description}</td>
										<td class="td">文件导出为空</td>
										<td class="td"><fmt:formatDate value="${run.runTime}" pattern="yyyy-MM-dd HH:mm:ss" /></td>
										<td class="td"><fmt:formatDate value="${run.endTime}" pattern="yyyy-MM-dd HH:mm:ss" /></td>	
                                        <td class="td"><fmt:formatNumber value="${run.rowLines}" pattern="#" type="number"/> / <fmt:formatNumber value="${run.numLines}" pattern="#" type="number"/></td>
                                        	
	                                   <td class="td"><a href="javascript:void(0):" onclick="ShowDiv('${run.recordNo }','fade');" >错误消息</a> </td>
	                            
									</tr>
								</c:if>
		
								
								<c:if test="${run.lockFlag=='X'}">
									<tr align="center" bgcolor="#FF3399">
										<td class="td">${run.recordNo}</td>
									    <td class="td">${run.companyId}</td>
										<td class="td">${run.fileName}</td>
										<td class="td">${run.description}</td>
										<td class="td">文件导出内容错误</td>
										<td class="td"><fmt:formatDate value="${run.runTime}" pattern="yyyy-MM-dd HH:mm:ss" /></td>
										<td class="td"><fmt:formatDate value="${run.endTime}" pattern="yyyy-MM-dd HH:mm:ss" /></td>	
                                       	<td class="td"><fmt:formatNumber value="${run.rowLines}" pattern="#" type="number"/> / <fmt:formatNumber value="${run.numLines}" pattern="#" type="number"/></td>
											
										<td class="td"><a href="javascript:void(0):" onclick="ShowDiv('${run.recordNo }','fade');" >错误消息</a> </td>
										 
									</tr>
								</c:if>
								 
								<c:if test="${run.lockFlag=='S'}">
									<tr align="center">
										<td class="td">${run.recordNo }</td>
										<td class="td">${run.companyId}</td>
										 <td class="td">${run.fileName}</td> 
										<td class="td">${run.description}</td>
										<td class="td">凭证导入成功</td>
										<td class="td"><fmt:formatDate value="${run.runTime}" pattern="yyyy-MM-dd HH:mm:ss" /></td>
										<td class="td"><fmt:formatDate value="${run.endTime}" pattern="yyyy-MM-dd HH:mm:ss" /></td>	
										<td class="td"><fmt:formatNumber value="${run.rowLines}" pattern="#" type="number"/> / <fmt:formatNumber value="${run.numLines}" pattern="#" type="number"/></td>
										<td class="td">&nbsp;</td>	
									</tr>
								</c:if>
								
									<c:if test="${run.lockFlag=='T'}">
									<tr align="center" bgcolor="yellow">
										<td class="td">${run.recordNo }</td>
										<td class="td">${run.companyId}</td>
										 <td class="td">${run.fileName}</td> 
										<td class="td">${run.description}</td>
										<td class="td">更新失败</td>
										<td class="td"><fmt:formatDate value="${run.runTime}" pattern="yyyy-MM-dd HH:mm:ss" /></td>
										<td class="td"><fmt:formatDate value="${run.endTime}" pattern="yyyy-MM-dd HH:mm:ss" /></td>	
                                       	<td class="td"><fmt:formatNumber value="${run.rowLines}" pattern="#" type="number"/> / <fmt:formatNumber value="${run.numLines}" pattern="#" type="number"/></td>
                                        	
										<td class="td"><a href="javascript:if(confirm('确实要重试吗吗?'))location='/HFG/record/${run.infoId}/reset'">重试</a>
										||<a href="javascript:void(0):" onclick="ShowDiv('${run.recordNo }','fade');" >错误消息</a> 
									 </td>
										
									</tr>
								</c:if>
								<div id="fade" class="black_overlay"> </div>
										<div id="${run.recordNo }" class="white_content">
										    <div style="text-align: right; cursor: default; height: 40px;" id="move">
										         <span style="font-size: 16px;" onclick="CloseDiv('${run.recordNo }','fade');">关闭</span>
										     </div>
										        ${run.message }
										</div>
						</c:forEach>
					</c:if>
					<tr>
						<td colspan="6" align="center">${fenye.viewButton}</td>
					</tr>
				</table>


